home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / SDKs / AutoPay SDK Mac R1.02 / AutoPay™ Development / DMIdeveloper.h.c < prev   
Encoding:
Text File  |  1995-11-02  |  3.1 KB  |  114 lines  |  [TEXT/CWIE]

  1. // ****************************************************************
  2. // REVISION NOTES ARE AT END OF THIS FILE.
  3. // Last update 7/21/95.
  4. // ****************************************************************
  5.  
  6. // Note that "shorts" are 2-byte ints.
  7.  
  8. // This is used to align structure bytes properly on both PowerPC and
  9. // 68000 processors.
  10.  
  11. #if defined(powerc) || defined (__powerc) || GENERATINGPOWERPC
  12. #pragma options align=mac68k
  13. #endif
  14.  
  15. typedef struct
  16. {
  17.     short        quantity;
  18.     char            name[40];
  19.     char            prodCode[16];
  20.     char            varCode[16];
  21.     float            price;
  22.     short        maxPurchase;
  23.     short        minPurchase;
  24.     short        editable;
  25.     float            shUSA;
  26.     float            shFOR;
  27. }    purchaseItemType;
  28.  
  29. typedef struct
  30. {
  31.     char            name[40];
  32.     float            price;
  33.     short        maxPurchase;
  34.     short        minPurchase;
  35.     char            prodCode[16];
  36.     float            shUSA;
  37.     float            shFOR;
  38.     short        numVarCodes;
  39.     short        numPurchased;
  40.     char            varCode1[16];
  41.     char            varCode2[16];
  42.     char            varCode3[16];
  43.     char            varCode4[16];
  44.     char            varCode5[16];
  45.     char            varCode6[16];
  46.     char            varCode7[16];
  47.     char            varCode8[16];
  48.     
  49. }    catalogItemType, *catalogItemTypePtr;
  50.  
  51. typedef struct
  52. {
  53.     short            userAborted;                // AutoPay module sends
  54.     short            userChoseWhichOption;        // these to your app...
  55.     short            modemPaymentAccepted;
  56.     short            userSuccessfullyTelUnlocked;
  57.     short            userSuccessfullyMailUnlocked;
  58.     short            modemPaymentIncludedReg;
  59.     float                finalPurchaseAmount;
  60.     char                orderNumber[16];
  61.     char                serialNumber[30];
  62.     char                unlockCode[30];    
  63.     char                usersName[80];                
  64.     
  65.     char                programName[30];            // Your app sends these to
  66.     char                programSource[20];            // the AutoPay module...
  67.     char                encodeMeth[30];
  68.     char                privateKey[30];
  69.     char                programID[20];
  70.     char                programPassword[20];
  71.     short            returnSerialNum;
  72.     short            areAdditionalItemsForSale;    
  73.     char                *screenText[10];
  74.     short            textSize[10];
  75.     short            textFont[10];    
  76.     short            numItemsInCatalog;
  77.     catalogItemType    *catalogItem[20];    
  78.     short            numItemsPrepurchased;
  79.     purchaseItemType    prepurchaseItem[6];
  80.     
  81. } digiMonBlock;
  82.  
  83. // This tells compiler to reset any byte alignment changes made.
  84.  
  85. #if defined(powerc) || defined(__powerc) || GENERATINGPOWERPC
  86. #pragma options align=reset
  87. #endif
  88.  
  89. // Revision history follows:
  90.  
  91. // ****************************************************************
  92. // These structures were revised on 1/21/95
  93. // so that char[] arrays were all even lengths.
  94. // This insures compatibility with Pascal development
  95. // environments.
  96.  
  97. // Revised 1/25 to replace booleans with 2-byte ints (1=true, 0=false)
  98.  
  99. // Revised 2/11 to add new field (numPurchased) to catalogItemType.
  100. // This is returned by the AutoPay Module to your program, in case
  101. // you need to know what items were purchased. Items not purchased get
  102. // a zero in this field.
  103.  
  104. // Also (2/11) added a new field to the DMCB. The field is called
  105. // userSuccessfullyMailUnlocked. It is turned =1 when the user
  106. // types in the proper unlocking code after receiving mail registration.
  107.  
  108. // Order of the DMCB fields also changed 2/11.
  109.  
  110. // Revised 5/5/95    Changed int declarations to shorts, set 68K alignment
  111. //                    for PowerPC code
  112. // ****************************************************************
  113.  
  114. // Note that "shorts" are 2-byte ints.